package com.xbb.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xbb.entity.Student;
import com.xbb.entity.dto.StudentDto;
import com.xbb.mapper.StudentMapper;
import com.xbb.service.StudentService;

@Service
public class StudentServiceImpl implements StudentService{

	@Autowired
	StudentMapper studentMapper;

	@Override
	public List<StudentDto> getStus(StudentDto studentDto) {
		return studentMapper.getStus(studentDto);
	}

	@Override
	public boolean addStu(Student student) {
		return studentMapper.addStu(student);
	}

	@Override
	public boolean updateStu(Student student) {
		return studentMapper.updateStu(student);
	}

	@Override
	public boolean delStu(int stuid) {
		return studentMapper.delStu(stuid);
	}

	@Override
	public Student getStuById(int id) {
		return studentMapper.getStuById(id);
	}

	@Override
	public List<StudentDto> queryByIds(String ids) {
		String[] split = ids.split(",");
		return studentMapper.queryByIds(split);
	}


	
}
